<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=s, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // [['张三',1],[2,'李四']]
        // const arr = [{ id: 1, name: '张三' }, { id: 2, name: '李四' }]
        // const arr2 = []
        // const arr1 = []
        // arr.forEach(item => {
        //     const arr2 = []
        //     arr2.push(item.id)
        //     arr2.push(item.name)
        //     arr1.push(arr2)
        // })
        // console.log(arr1);
        // const obj = { time: 111, id: 1, name: '张三', a: 200, b: 300 }
        // console.log(Object.values(obj));


        // [1,2]
        // [[1,2],[3,4]]
        const arr = [{ id: 1, name: '张三' }, { id: 2, name: '李四' }]
        const arr1 = []
        arr.forEach(item => {
            const arr2 = []
            arr2.push(item.id, item.name)
            arr1.push(arr2)
        })
        console.log(arr1);
    </script>
</body>

</html>